<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="lib/vue.js"></script>
</head>
<body>
<div id="root">
    <p v-red>123</p>
    <one></one>
</div>
</body>
<script type="module">
    import directives from "./directives";
    for(let key in directives){
        Vue.directive(key,directives[key]);
    }
    // Vue.directive("red",function(el){
    // 	el.style.color = "red";
    // })
    new Vue({
        el: "#root",
        components:{
            One:{
                template:(`
				    <p v-red>今天天气阴！适合运动，小乐组的今天晚上要爬楼21层</p>
				`),

                directives:{
                    // red(el){
                    // 	el.style.color = "red"
                    // },
                }
            }

        }
    })
</script>
</html>